package com.medical.controller;

import com.medical.pojo.Device;
import com.medical.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("device")
public class DeviceController {
    @Autowired
    private DeviceService deviceService;

    @RequestMapping("/findAll")
    public List<Device> findAll(){
        return deviceService.findAll();
    }

    @RequestMapping("/getOne")
    public Device getOne(Integer id){
        return deviceService.getOne(id);
    }

}
